package controller

import "github.com/gin-gonic/gin"

func PageGroup(g *gin.RouterGroup) {
	g.GET("/user/login.html", LoginPage)
	g.GET("/user/forget.html", ForgetPage)
}

func GroupV1(g *gin.RouterGroup) {

	g.POST("/api/user/login", LoginCheck)
	g.POST("/api/user/changepwd", ChangePwd)
	g.POST("/api/user/sendreset", SendResetPwdLink)
	g.POST("/api/user/resetpwd", ResetPwd)
	//TODO 组件安装
	g.POST("/api/component/nginx/install")
	g.POST("/api/component/nginx/remove")
	g.POST("/api/component/nginx/updateconfig")
	g.POST("/api/component/nginx/addnewsite")

	g.POST("/api/component/mysql/install")
	g.POST("/api/component/mysql/remove")
	g.POST("/api/component/mysql/restart")
	g.POST("/api/component/mysql/adddb")

	g.POST("/api/component/mysql/back")

	g.POST("/api/component/php/install")
	g.POST("/api/component/php/remove")

}

func GroupV2(g *gin.RouterGroup) {

}
